package com.demo.hc.biz.task.bean;

/**
 * Created by 1 on 2017/4/25.
 */
public enum TaskDistributeEnum {

    VP_CLAIM(1,"副总已认领 "),

    MD_CLAIM(2,"总监已认领"),

    TASK_DISTRIBUTE(3,"任务已分配"),

    CHECK_SUCCESS(4,"审核成功"),

    CHECK_FAIL(5,"审核失败");

    private int type;

    private String name;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    TaskDistributeEnum(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public static TaskDistributeEnum getTaskDistributeEnum(int type){
        for (TaskDistributeEnum typeEnum: values()) {
            if (typeEnum.getType() == type){
                return typeEnum;
            }
        }
        return null;
    }

    public static String getName(int type){
        for (TaskDistributeEnum typeEnum: values()) {
            if (typeEnum.getType() == type){
                return typeEnum.getName();
            }
        }
        return null;
    }

}
